/* 
 * File:   EntityParticleComponent.h
 * Author: RedEyedKiller
 *
 * Created on 17 Οκτώβριος 2010, 1:20 μμ
 */

#ifndef ENTITYPARTICLECOMPONENT_H
#define	ENTITYPARTICLECOMPONENT_H

#include "EntityComponent.h"
#include "../Vector2.h"
#include <string>

namespace EntitySystem
{

namespace components
{

class ParticleComponent : public EntityComponent
{
public:
    ParticleComponent(const std::string& sys,const Math::Vector2F& relPosit);
    ParticleComponent(const ParticleComponent& orig);
    virtual ~ParticleComponent();

    virtual ParticleComponent* Clone();
    bool RegisterEmiter();
    /**
     * @return The type of this component.
     */
    virtual ENTCOMP_TYPES GetType(){return ENTCOMP_PARTICLES;}

    void SetSystem(std::string& system);
    void SetRelativePosition(const Math::Vector2F& relPos);

private:
    /**
     * The name of the particle system this component registres its emiters.
     */
    std::string system;
    /**
     * The relative position of this component in Entity.
     */
    Math::Vector2F relPosition;
    int emiterId;
};

};

};

#endif	/* ENTITYPARTICLECOMPONENT_H */
